package com.igeek.collateral.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Set;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author author
 * @since 2024-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
@ApiModel(value="User对象", description="用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户账号")
    @TableField("username")
    private String username;

    @ApiModelProperty(value = "用户密码")
    @TableField("password")
    private String password;

    @ApiModelProperty(value = "职位")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "用户头像")
    @TableField("pic")
    private String pic;

    @ApiModelProperty(value = "用户性别 0：男 1：女")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty(value = "联系电话")
    @TableField("telephone")
    private String telephone;

    @ApiModelProperty(value = "地址")
    @TableField("address")
    private String address;

    //用户图片存储路径
    @ApiModelProperty(value = "用户图片")
    @TableField("img")
    private String img;

    @ApiModelProperty(value = "是否删除")
    @TableField("is_deleted")
    private Integer isDeleted;



    //一对多 关联角色
    @TableField(exist = false)
    private Set<Role> roles;


}
